<extend name="CigoAdminLib@Common/pageContent"/>
<block name="head-middle">
	<script type="text/javascript" src="__CIGO_ADMIN__/cigoos/list.js"></script>
</block>

<block name="content">
	<div class="panel panel-info">
		<div class="panel-heading">
			回收数据列表
		</div>
		<table id="data-list" class="cigo-data-list table table-striped table-hover" url="<<{:U('getTrashData')}>>">
			<tr>
				<th width="35%">标题</th>
				<th width="20%">数据类型</th>
				<th width="15%">删除时间</th>
				<th width="30%">数据操作</th>
			</tr>
		</table>
		<div class="panel-footer">
			<div class="show-page"></div>
		</div>
	</div>
</block>

<block name="js-footer">
	<script type="text/javascript">
		function createTr(dataListView, itemSubViewList, listKey, dataItem, level, hasSubFlag, hasSubCls) {
			itemSubViewList.push(
				'<tr class="list-item">' +
				'   <td>' +
				'       <a href="' + dataItem['url_edit'] + '">' +
				'           <span>' + dataItem['title'] + '</span>' +
				'       </a>' +
				'   </td>' +
				'   <td>' +
				'       ' + dataItem['tip_type'] + '&nbsp;(编号:' + dataItem['data_id'] + ')' +
				'   </td>' +
				'   <td>' +
				'       ' + dataItem['tip_del_time'] +
				'   </td>' +
				'   <td>' +
				'       <a class="btn btn-default" href="' + dataItem['url_edit'] + '" >编辑</a>&nbsp;&nbsp;' +
				'       <a class="btn btn-default ajax-get confirm" href=\'<<{:U("revertData", false, false)}>>' + Think.DEEP + 'dataId' + Think.DEEP + dataItem['data_id'] + Think.DEEP + 'type' + Think.DEEP + dataItem['type'] + '\' >恢复数据</a>&nbsp;' +
				'       <a class="btn btn-default ajax-get confirm" href=\'<<{:U("removeData", false, false)}>>' + Think.DEEP + 'dataId' + Think.DEEP + dataItem['data_id'] + Think.DEEP + 'type' + Think.DEEP + dataItem['type'] + '\' >彻底删除</a>' +
				'   </td>' +
				'</tr>'
			);
		}

		$(function () {
			//操作列表
			var dataList = $('#data-list');
			refreshDataList(dataList, dataList.attr('url'), '', '.show-page', '', createTr, true);
		});
	</script>
</block>